--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit cd323c9ca841d08a19c0831c0437ebe4ea9682fd
Parents : e798bac
Author : Mark Qvist <mark@unsigned.io>
Date : 2026-04-19T01:31:04+02:00
Background data persist on app pause on Android
Changes
2 files changed, 3 insertions(+), 5 deletions(-)
Diff
diff --git a/sbapp/main.py b/sbapp/main.py
index e87c8027..9e8be466 100644
--- a/sbapp/main.py
+++ b/sbapp/main.py
@@ -1063,7 +1063,7 @@ class SidebandApp(MDApp):
self.sideband.setstate("app.running", True)
self.sideband.setstate("app.foreground", False)
self.app_state = SidebandApp.PAUSED
- self.sideband.should_persist_data()
+ self.sideband.should_persist_data(background=True)
RNS.log("App paused", RNS.LOG_DEBUG)
return True
diff --git a/sbapp/sideband/core.py b/sbapp/sideband/core.py
index e2b978c8..367ba9b9 100644
--- a/sbapp/sideband/core.py
+++ b/sbapp/sideband/core.py
@@ -580,10 +580,8 @@ class SidebandCore():
total += entry.stat(follow_symlinks=False).st_size
return total
- def should_persist_data(self):
- if self.reticulum != None:
- self.reticulum._should_persist_data()
-
+ def should_persist_data(self, background=False):
+ if self.reticulum != None: self.reticulum._should_persist_data(background=background)
self.save_configuration()
def __load_telemetry_collector_excluded(self):
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────